<extend name="Base/common"/>
<block name="head_css">
<link href="__PUBLIC__/Green/css/usercenter.css" rel='stylesheet' type='text/css' />
</block>
<block name="head_script">
<script type="text/javascript" src="__PUBLIC__/Green/js/usercenter.js"></script>
<script type="text/javascript" src="__PUBLIC__/Green/js/moment.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Green/js/fullcalendar.min.js"></script>
<script type="text/javascript">
var strMonth = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
    strWeek = ["日", "一", "二", "三", "四", "五", "六"];
</script>
</block>
<block name="body">
    <div class="width1000">
        <div class="top_tit">
            <a href="{:U('User/index')}">用户中心</a> &gt;&gt; 收益管理
        </div>
        <div class="clearfix relative">
            <include file="User/nav" />
            <div class="user_center">
                <div class="user_profit">
                    <div class="profit_top">
                        <div class="profit_money">
                            <div class="total">
                                <div class="title">账户余额</div>                        
                                <div>
                                <span class="money">
                                    {$total_money|default=0}
                                </span><span class="unit">车币</span>
                                </div>
                            </div>
                            <div class="list">
                                <p>可用车币：<span class="money_normal">{$cash_money|default=0}</span></p>
                                <p>冻结车币：<span class="money_frozen">{$freeze_money|default=0}</span></p>
                            </div>
                        </div>
                        <div class="cash">
                            <a href="{:U('User/exchange')}" class="btn_hover profit_money_btn">兑换</a>
                            <a href="{:U('User/cashLog')}" class="btn_hover profit_detail_btn">详情</a>
                        </div>
                        <div class="clear"></div>
                    </div>
                    
                <empty name="orders">
                    <div class="empty_div" style="text-align: center">
                       
                        	
                            <div style="margin-top: 30px;font-size: 16px;"><img alt="" src="__PUBLIC__/Green/images/no_order.png"><span style="padding-left: 10px;">暂无生效的保单</span> </div>
                            	
                           <div style="margin-top: 20px;font-size: 16px;"> <a href="{:U('Insurance/index')}" class="i_add buy_btn">立即购险</a></div>
                       </div>   
                <else />
                    <volist name="orders" id="order">
                    <div class="profit_month clear">
                        <ul>
                            <li>
                                <span class="profit_margin1">
                                    {$order.car_no}
                                </span>
                                <span>{$order.start_date}</span>至
                                <span>{$order.end_date}</span>
                                <span class="f_r">未出险</span>
                            </li>
                            <li>
                                行驶天数： {$order.run_num|default=0}天
                            </li>
                            <li>
                                停驶天数： {$order.stop_num|default=0}天
                            </li>
                            <li>
                                基本奖励： {$order.n_amt|default=0}车币
                            </li>
                            <li>
                                环保奖励： {$order.n_frozen_amt|default=0}车币
                            </li>
                        </ul>
                        <div class="month_time">
                            <div class="month_time_color clear">
                                <div class="f_l span3">
                                    <span class="icon_color1"></span>
                                    <p>停驶日期</p>
                                </div>
                                <div class="f_l span3">
                                    <span class="icon_color2"></span>
                                    <p>行驶天数</p>
                                </div>
                            </div>
                            <div id="cale_{$i}"></div>
                            <script type="text/javascript">
                                $().ready(function() {
                                    $('#cale_{$i}').fullCalendar({
                                        theme: false,
                                        header: {
                                            left: 'prev',
                                            center: 'title',
                                            right: 'next'
                                        },
                                        eventLimit: true,
                                        monthNames: strMonth,
                                        monthNamesShort: strMonth,
                                        dayNames: strWeek,
                                        dayNamesShort: strWeek,
                                        events:{
                                            url:'{:U("getDayLog")}',
                                            type:'POST',
                                            data:{
                                                obdid:'{$car.obdid}'
                                            }
                                        }
                                    });
                                    
                                });
                            </script>
                        </div>
                    </div>
                    </volist>
                </empty>
                    
                    
                </div>
            </div>
        </div>
    </div>
</block>    
<block name="script">
<script type="text/javascript" src="__PUBLIC__/Green/js/insurance.js"></script>
<script type="text/javascript">
    highlight_nav("{:U('User/profit')}");
</script>
</block>
